home *** CD-ROM | disk | FTP | other *** search
- property pCharCode, pSpr, pFrameCount
-
- on beginSprite me
- global gTestFlashIndex, gImplementedCharacters
- pSpr = sprite(me.spriteNum)
- if voidp(gTestFlashIndex) or (gTestFlashIndex > count(gImplementedCharacters)) then
- gTestFlashIndex = 1
- else
- gTestFlashIndex = gTestFlashIndex + 1
- end if
- if gTestFlashIndex > count(gImplementedCharacters) then
- put "Test complete"
- halt()
- else
- pCharCode = getPropAt(gImplementedCharacters, gTestFlashIndex)
- pSpr.member = member(pCharCode & ".swf")
- updateStage()
- end if
- put "Testing speak and move_glass events for" && pCharCode && "(other event types not tested)"
- pFrameCount = pSpr.member.frameCount
- end
-
- on speak me, speakSounds
- repeat with VOname in speakSounds
- soundFile = VOpath(pCharCode, VOname)
- if FileExists(soundFile) then
- next repeat
- end if
- debugAlert("Missing sound file" && soundFile)
- end repeat
- if pSpr.frame = pFrameCount then
- go("test database")
- end if
- end
-
- on nextGlassMember me, glassType, glassPosition
- return pCharCode & "_" & glassType & "_" & glassPosition
- end
-
- on nextHandMember me, glassPosition
- return pCharCode & "_" & "hand" & "_" & glassPosition
- end
-
- on move_glass me, glassPosition
- if glassPosition = "Hide" then
- nothing()
- else
- glassPosition = char 1 of glassPosition
- repeat with glassType in ["bee", "coc", "sho", "old", "hib", "col"]
- nextGlass = nextGlassMember(me, glassType, glassPosition)
- if the number of member nextGlass < 1 then
- put "Glass" && nextGlass && "is missing"
- end if
- end repeat
- nextHand = nextHandMember(me, glassPosition)
- if the number of member nextHand < 1 then
- put "Hand" && nextHand && "is missing"
- end if
- end if
- end
-
- on newRect
- end
-